# RUN: %lldb -b -s %s -c %p/Inputs/x86-32-freebsd-multithread.core | FileCheck %s

thread list
# CHECK: * thread #1: tid = 100761, 0x00402ed1, name = 'a.out', stop reason = signal SIGSEGV
# CHECK-NEXT:   thread #2: tid = 100744, 0x2057f78b, name = 'a.out', stop reason = signal SIGSEGV
# CHECK-NEXT:   thread #3: tid = 100762, 0x00402edc, name = 'a.out', stop reason = signal SIGSEGV
# CHECK-NEXT:   thread #4: tid = 100763, 0x00402edc, name = 'a.out', stop reason = signal SIGSEGV


register read --all
# CHECK-DAG: ecx = 0x04040404
# CHECK-DAG: edx = 0x03030303
# CHECK-DAG: edi = 0x01010101
# CHECK-DAG: esi = 0x02020202
# CHECK-DAG: st4 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x00 0x40}
# CHECK-DAG: st5 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x01 0x40}
# CHECK-DAG: st6 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x02 0x40}
# CHECK-DAG: st7 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 0x03 0x40}

thread select 3
# CHECK: (lldb) thread select 3
register read --all
# CHECK-DAG: ecx = 0x14141414
# CHECK-DAG: edx = 0x13131313
# CHECK-DAG: edi = 0x11111111
# CHECK-DAG: esi = 0x12121212
# CHECK-DAG: st4 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0x00 0x40}
# CHECK-DAG: st5 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0x01 0x40}
# CHECK-DAG: st6 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x90 0x02 0x40}
# CHECK-DAG: st7 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0x02 0x40}

thread select 4
# CHECK: (lldb) thread select 4
register read --all
# CHECK-DAG: ecx = 0x24242424
# CHECK-DAG: edx = 0x23232323
# CHECK-DAG: edi = 0x21212121
# CHECK-DAG: esi = 0x22222222
# CHECK-DAG: st4 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xa0 0x01 0x40}
# CHECK-DAG: st5 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xa0 0x02 0x40}
# CHECK-DAG: st6 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xf0 0x02 0x40}
# CHECK-DAG: st7 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xa0 0x03 0x40}
